package com.jichaoyun.dao.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jichaoyun.model.entity.StationInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhangzhen
 * @since 2023-11-11
 */
@Mapper
public interface StationInfoMapper extends BaseMapper<StationInfo> {

    StationInfo selectFirstOne();
    List<Integer> selectStationNoListByUserType(Integer userType);

    @Select("select station_no from stationInfo where user_type = 0 and is_use = 1")
    List<Integer> selectAllMainStationList();

    @Select("select station_no from stationInfo where user_type = 0 and is_use = 1 and line_id = #{lineId}")
    List<Integer> selectMainStationListByLineId(Integer lineId);
    List<Integer> selectLineOneMainStationList();

}
